<!-- static || fixed -->
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
  <div class="navbar-header">
    <%= link_to help_path,:class=>"navbar-brand" do%>
      WDW
    <%end%>
  </div>
  <div class="navbar-collapse collapse">
  <% if user_signed_in? %>
    <ul class="nav navbar-nav">
    <% unless current_project.nil? %>
      <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown" style="color:#428bca;"><%= current_project.name%><b class="caret"></b></a>
        <ul class="dropdown-menu">
          <li><%= link_to "项目根目录", first_folders_path() %></li>
          <li><%= link_to "借阅记录",applies_path() %></li>
          <li><%= link_to "共享记录",shares_path() %></li>
          <li><%= link_to "切换项目" ,edit_current_member_path %></li>
        </ul>
      </li>
      
      <li><%= link_to "我的文档",root_path%></li>

      <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown">成员<b class="caret"></b></a>
        <ul class="dropdown-menu">
          <li><%= link_to "成员列表" , members_path() %></li>
          <li><%= link_to "新建成员" , new_member_path() %></li>
        </ul>
      </li>
      
      <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown">分组<b class="caret"></b></a>
        <ul class="dropdown-menu">
          <li><%= link_to "分组列表" , groups_path() %></li>
          <li><%= link_to "新建分组" , new_group_path() %></li>
        </ul>
      </li>
      <%end%>

      <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown">项目<b class="caret"></b></a>
        <ul class="dropdown-menu">
          <li><%= link_to "项目列表" , projects_path() %></li>
          <li><%= link_to "新建项目" , new_project_path() %></li>
        </ul>
      </li>

      <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown">用户<b class="caret"></b></a>
        <ul class="dropdown-menu">
         <li><%= link_to "项目列表" , projects_path() %></li>
          <li><%= link_to "新建项目" , new_project_path() %></li>
          <li><%= link_to "用户列表" , users_path() %></li>

          <li><%= link_to "新建用户" , new_user_path() %></li>
          <li><%= link_to "导入用户" , new_user_path() %></li>
        </ul>
      </li>

      <li><%= link_to "操作记录",notes_path%></li>

    </ul>
    <ul class="nav navbar-nav navbar-right">
      <li class="dropdown">
        <a href="#1" class="dropdown-toggle" data-toggle="dropdown">
        <%= current_user.name%> <b class="caret"></b></a>
        <ul class="dropdown-menu">
            <li><%= link_to "退出项目",current_member_path(),:method=>:delete %></li>
            <li><%= link_to "个人资料",profile_path%></li>
            <li><%= link_to "修改密码",edit_password_path%></li>
            <li><%= link_to "退出",destroy_user_session_path,method: :delete  %></li>
        </ul>
      </li>
    </ul>
  <%else%>
    <ul class="nav navbar-nav navbar-right">
      <li><%= link_to "登 录",new_user_session_path%></li>
    </ul>
  <%end%>
  </div><!--/.nav-collapse -->
</div>
</div>